package com.dingreading.cloud.admin.feign;

import com.dingreading.cloud.admin.config.FeignConfig;
import com.dingreading.cloud.admin.dto.CaTeacherDto;
import com.dingreading.cloud.admin.feign.fallback.SomsFeignFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "soms-service", path = "/api", configuration = FeignConfig.class, fallback = SomsFeignFallBack.class)
public interface SomsFeignService {

    @GetMapping("/class/haveStageUid")
    boolean haveStageUid(
            @RequestParam(value = "stageUid") String stageUid
    );

    @GetMapping("/class/haveProjectUid")
    boolean haveProjectUid(
            @RequestParam(value = "projectUid") String projectUid
    );

    @GetMapping("/teacher/getTeachersByScheduleUids")
    List<CaTeacherDto> getTeachersByScheduleUids(
            @RequestParam(value = "scheduledUids") List<String> scheduledUids
    );

}
